package top.vanchor.myblog2back.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import top.vanchor.myblog2back.entity.BlogComment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Ding
 * @since 2021-11-12
 */
@Mapper
public interface BlogCommentMapper extends BaseMapper<BlogComment> {

    List<BlogComment> getAllCommentsByBlogId(@Param("blogId") int blog_id,@Param("uId") int uId);

    List<Integer> getDelIdsIgnoreThisId(int comment_id);

    int toDelCommentByIds(List<Integer> allIDs);

    int toLikeComment(@Param("commentId") int commentId,@Param("uId") int uId,@Param("type") int type);
}
